//
//  userAccount.m
//  投融保
//
//  Created by wangan on 13-12-19.
//  Copyright (c) 2013年 木叶科技. All rights reserved.
//

#import "userAccount.h"
#import "bindBankCard.h"
#import "notifactionView.h"
@interface userAccount ()
extern NSDictionary *accountDic;//帐户状态  认证  余额
extern NSDictionary *userInformation ;//用户信息
@end

@implementation userAccount
@synthesize userName,balance,certifyStatus;
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        self.view.backgroundColor = [UIColor blackColor];
    }
    return self;
}

- (void)viewDidLoad
{
    [super viewDidLoad];
    // Do any additional setup after loading the view from its nib.
    [self initView];
}
-(void)initView{
    NSLog(@"%@",[accountDic valueForKey:@"certifyStatus"]);
    NSString *certify = [[NSString alloc]initWithFormat:@"%@",[accountDic valueForKey:@"certifyStatus"]];
    certifyStatus.text = certify;
    
    
    userName.text = [userInformation valueForKey:@"realName"];
    
    NSString * availableBalance = [[accountDic valueForKey:@"availableBalance"] stringValue];
    balance.text = availableBalance;
    
}
- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}
//银行卡点击
- (IBAction)binBankCardClick:(UIButton *)sender {
    [self presentViewController:[bindBankCard new] animated:YES completion:nil];
}
//实名点击
- (IBAction)nameClick:(UIButton *)sender {
    //    [self presentViewController:nil animated:YES completion:nil];
}
//通知点击
- (IBAction)notifactClick:(UIButton *)sender {
    [self presentViewController:[notifactionView new] animated:YES completion:nil];
}
- (IBAction)btnReturn:(UIButton *)sender {
    [self dismissViewControllerAnimated:YES completion:nil];
}
#pragma mark-   -----------状态栏底色------
- (UIStatusBarStyle)preferredStatusBarStyle
{
    [self.view setBackgroundColor:[UIColor blackColor]];
    return UIStatusBarStyleLightContent;
}
- (BOOL)prefersStatusBarHidden
{
    return NO;
}
@end
